package com.mockapi.dto;

import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;

/**
 * 事件请求DTO
 */
@Data
public class EventRequest {

    private Long id;

    @NotBlank(message = "事件名称不能为空")
    private String name;

    private String description;

    @NotBlank(message = "事件类型不能为空")
    private String eventType;

    @NotBlank(message = "触发类型不能为空")
    private String triggerType;

    private Long routeId;

    private String triggerConfig;

    @NotBlank(message = "事件配置不能为空")
    private String eventConfig;

    private Boolean enabled = true;

    @Min(value = 0, message = "重试次数不能小于0")
    @Max(value = 10, message = "重试次数不能大于10")
    private Integer retryCount = 0;

    @Min(value = 1000, message = "重试间隔不能小于1000毫秒")
    @Max(value = 60000, message = "重试间隔不能大于60000毫秒")
    private Integer retryInterval = 5000;

    @Min(value = 1000, message = "超时时间不能小于1000毫秒")
    @Max(value = 300000, message = "超时时间不能大于300000毫秒")
    private Integer timeout = 30000;
} 